package com.bsoft.gol.hcs.satisfyStatic.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * 满意度调查统计报表配置
 * Created by ChenJij on 2022/7/25.
 */
@Entity
@Table(name = "ods_satisfy_statistic_setting")
public class OdsSatisfyStatisticSetting {
    private String settingId;
    private String tenantId;
    private String settingName;
    private String questionnaireId;
    private String questionnaireName;
    private Date createTime;
    private Date modifyTime;

    @Id
    @Column(name = "setting_id", nullable = false)
    public String getSettingId() {
        return settingId;
    }

    public void setSettingId(String settingId) {
        this.settingId = settingId;
    }

    @Basic
    @Column(name = "tenant_id", nullable = false, length = 20)
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Basic
    @Column(name = "setting_name", nullable = false, length = 20)
    public String getSettingName() {
        return settingName;
    }

    public void setSettingName(String settingName) {
        this.settingName = settingName;
    }

    @Basic
    @Column(name = "questionnaire_id", nullable = false, length = 64)
    public String getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(String questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    @Basic
    @Column(name = "questionnaire_name", nullable = false, length = 200)
    public String getQuestionnaireName() {
        return questionnaireName;
    }

    public void setQuestionnaireName(String questionnaireName) {
        this.questionnaireName = questionnaireName;
    }

    @Basic
    @Column(name = "create_time", nullable = false)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modify_time", nullable = true)
    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof OdsSatisfyStatisticSetting)) return false;

        OdsSatisfyStatisticSetting that = (OdsSatisfyStatisticSetting) o;

        if (settingId != null ? !settingId.equals(that.settingId) : that.settingId != null) return false;
        if (tenantId != null ? !tenantId.equals(that.tenantId) : that.tenantId != null) return false;
        if (settingName != null ? !settingName.equals(that.settingName) : that.settingName != null) return false;
        if (questionnaireId != null ? !questionnaireId.equals(that.questionnaireId) : that.questionnaireId != null)
            return false;
        if (questionnaireName != null ? !questionnaireName.equals(that.questionnaireName) : that.questionnaireName != null)
            return false;
        if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false;
        return modifyTime != null ? modifyTime.equals(that.modifyTime) : that.modifyTime == null;
    }

    @Override
    public int hashCode() {
        int result = settingId != null ? settingId.hashCode() : 0;
        result = 31 * result + (tenantId != null ? tenantId.hashCode() : 0);
        result = 31 * result + (settingName != null ? settingName.hashCode() : 0);
        result = 31 * result + (questionnaireId != null ? questionnaireId.hashCode() : 0);
        result = 31 * result + (questionnaireName != null ? questionnaireName.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (modifyTime != null ? modifyTime.hashCode() : 0);
        return result;
    }
}